function validateLoginForm(name,pass){
  
    if(pass.length == 0 || pass == null){
        jQuery("#lblInfor").text('Password is required');
        return false;
    }
    if(name.length == 0 || name == null){
         jQuery("#lblInfor").text('Name is required'); 
         return false;
    }
    return true;
}
function validateRegisterForm(name,pass,email){
      if(name.length == 0 || name == null){
         jQuery("#errorName").text('Name is required');
         jQuery("#errorPass").text('');
         jQuery("#errorMail").text('');
         return false;
    }
    if(pass.length == 0 || pass == null){
        jQuery("#errorPass").text('Password is required');
        jQuery("#errorName").text('');
        jQuery("#errorMail").text('');
         return false;
    }
    var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
    if(!emailReg.test(email)){
         jQuery("#errorMail").text('Email is invalid');
         jQuery("#errorName").text('');
         jQuery("#errorPass").text('');
         return false;
    }
    if(email.length == 0 || email == null){
        jQuery("#errorMail").text('Email is required');
         jQuery("#errorName").text('');
         jQuery("#errorPass").text('');
         return false;
    }
    return true;
}